<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String path = request.getContextPath();  
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html>
<html>
<head>
	<base href="<%=basePath%>">
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>故障预警</title>
	
	<link rel="stylesheet" href="scripts/bootstrap/css/bootstrap.min.css" />
	<script src="scripts/jquery-3.1.1.min.js" type="text/javascript"></script>
	<script src="scripts/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
	
	<script>
		$(function() {
			alert_situation(1);
			alert_log(1);
		});
		
		function alert_situation(currPage) {
			$.ajax({
				type: 'post',
				url: 'alerts/getAlertSituation.action',
				data: {
					currPage: currPage
				},
				dataType: 'html',
				success: function(data) {
					$("#alert_situation").html(data);
				}
			});
		}
		
		function alert_log(currPage) {
			$.ajax({
				type: 'post',
				url: 'alerts/getAlertLog.action',
				data: {
					currPage: currPage
				},
				dataType: 'html',
				success: function(data) {
					$("#alert_log").html(data);
				}
			});
		}
	</script>
</head>

<body>
	<section>
	
    <!-- 预警情况 -->
	<div id="alert_situation" style="width:600px; height:600px; margin:50px auto auto 50px; display: inline-block;"></div>
	<div id="alert_log" style="width: 400px; height: 600px; margin: 50px 50px auto auto; display: inline-block;"></div>
	</section>
</body>
</html>